<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Morph Loader</title>
  <style>
    body {
      background-color: rgb(38, 40, 58);
      margin: 0;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      overflow: hidden;
    }

    .box {
      width: 40px;
      height: 40px;
      background: white;
      border-radius: 50%;
      position: relative;
      animation: magicMorph 4s ease-in-out infinite;
      box-shadow: 
        0 0 25px rgba(255, 255, 255, 0.6),
        0 0 50px rgba(100, 200, 255, 0.4);
      transform: translateZ(0);
      will-change: transform, border-radius;
    }

    @keyframes magicMorph {
      /* Start state */
      0%, 20% {
        transform: translateX(0) rotate(0deg) scale(1);
        border-radius: 50%;
      }

      /* Forward transition */
      22% {
        transform: translateX(20px) rotate(45deg) scale(1.075);
        border-radius: 45%;
      }

      24% {
        transform: translateX(40px) rotate(90deg) scale(1.15);
        border-radius: 40%;
      }

      26% {
        transform: translateX(60px) rotate(135deg) scale(1.225);
        border-radius: 35%;
      }

      28% {
        transform: translateX(80px) rotate(180deg) scale(1.3);
        border-radius: 30%;
      }

      30% {
        transform: translateX(100px) rotate(225deg) scale(1.375);
        border-radius: 25%;
      }

      32% {
        transform: translateX(120px) rotate(270deg) scale(1.45);
        border-radius: 20%;
      }

      34% {
        transform: translateX(140px) rotate(315deg) scale(1.525);
        border-radius: 15%;
      }

      36% {
        transform: translateX(160px) rotate(360deg) scale(1.6);
        border-radius: 10%;
      }

      /* End state */
      36%, 60% {
        transform: translateX(160px) rotate(360deg) scale(1.6);
        border-radius: 10%;
      }

      /* Backward transition */
      62% {
        transform: translateX(140px) rotate(315deg) scale(1.525);
        border-radius: 15%;
      }

      64% {
        transform: translateX(120px) rotate(270deg) scale(1.45);
        border-radius: 20%;
      }

      66% {
        transform: translateX(100px) rotate(225deg) scale(1.375);
        border-radius: 25%;
      }

      68% {
        transform: translateX(80px) rotate(180deg) scale(1.3);
        border-radius: 30%;
      }

      70% {
        transform: translateX(60px) rotate(135deg) scale(1.225);
        border-radius: 35%;
      }

      72% {
        transform: translateX(40px) rotate(90deg) scale(1.15);
        border-radius: 40%;
      }

      74% {
        transform: translateX(20px) rotate(45deg) scale(1.075);
        border-radius: 45%;
      }

      76% {
        transform: translateX(0) rotate(0deg) scale(1);
        border-radius: 50%;
      }

      /* Back to start state */
      76%, 100% {
        transform: translateX(0) rotate(0deg) scale(1);
        border-radius: 50%;
      }
    }
  </style>
</head>
<body>
  <div class="box"></div>
</body>
</html>